
function verif($scope, $browser,$http) {
	$scope.account_format = /^[a-zA-Z0-9]*$/;
	$scope.password_format = /^\w*$/;
	$scope.password2_format=/^\w*$/;
	$scope.name_format=/^[\u4e00-\u9fa5]*$/;
	$scope.idcard_format=/^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/;
	$scope.email_format=/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
	$scope.veryifcode_format=/^[a-zA-Z0-9]*$/;
	$scope.pwdchange=function(){
		$scope.password_diff =$scope.password!=$scope.password2;
	};
    $scope.checked = true;
	
	$scope._time = '';
	$scope.newverifycode = function(){
		$scope._time = (new Date()).getTime().toString();
	};
	$scope.msg = ['长度不能小于6位','长度不能大于16位','格式错误！！只能由数字或者字母构成','请填写帐号','请填写验证码','请填写邮箱','请填写真实的身份证号码','请填写姓名','请填写密码',
				  '请填写确认密码', '格式错误，请填写真实的身份证号码', '格式错误，请填写正确的邮箱地址', '错误请，填写正确的验证码', '密码长度小于6位', '密码长度大于14位', '格式错误', '前后两次密码不一致!!',
                  '姓名格式错误,只能为中文', '长度不能小于2位', '长度不能大于13位', '该账号已经注册,请重试', '该账号可以注册'

	];


	var error = $browser.cookies()['error'];
	if (error && error != "") {
        switch(error){
            case "0000": alert("验证码不正确"); break;
            case "0001": alert("注册失败"); break;
        }
        $browser.cookies('error');
    };

    $scope.fetch = function () {
            $http.get('/account/verifyaccount/' + $scope.account).
			success(
				function (data, status) {
				    if (data == "False") {
				        $scope.notregedted = false;
				        $scope.notunregedted = true;
				    }
				    if (data == "True") {
				        $scope.notregedted = true;
				        $scope.notunregedted = false;
				    }

				}).
			error(function (data, status) {
			    $scope.notregedted = true;
			});
    };
}






